#include <stdio.h>
#define LEN 10
void bubble_sort(double arr[], int len);
void show_arr(double arr[], int len);
int main(void)
{
    double nums[LEN] = {3.2, 1.0, 9.9, 6.6, 5.1, 2.0, 8.3, 0.2, 4.1, 7.0};

    bubble_sort(nums, LEN);
    show_arr(nums, LEN);
    
    return 0;
}

void bubble_sort(double arr[], int len)
{
    int i, j;
    double temp;

    for (i = 0; i < len - 1; i++)
    {
        for (j = 0; j < len - 1 - i; j++)
        {
            if (arr[j] < arr[j+1])
            {
                temp = arr[j];
                arr[j] = arr[j+1];
                arr[j+1] = temp;
            }
        }
    }

    return;
}

void show_arr(double arr[], int len)
{
    int i;

    for (i = 0; i < len; i++)
    {
        printf("%.1lf ", arr[i]);
    }

    return;
}